<template>
	<view class="container">
		<u-popup
			:show="show"
			closeable
			:round="10"
			mode="center"
			:safeAreaInsetBottom="false"
			@close="close"
		>
			<view class="main" :style="{background: templateConfig.page.themeColor}">
				<view class="title">分享给朋友</view>
				<view class="desc">朋友下单成功，可获得佣金</view>
				<image class="qrcode" src="https://oss.daccf.com/qrcode/c85c1dc1-9d74-44dd-94c5-84371bd4a48a.png" mode="aspectFill"></image>
				<view class="button_box">
					<view class="button" :style="{color: templateConfig.page.themeColor}">保存</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				templateConfig: uni.getStorageSync('templateConfig'),
				show: false,
			};
		},
		methods: {
			open () {
				this.show = true;
			},
			close () {
				this.show = false;
			}
		}
	}
</script>

<style scoped lang="scss">
	.container{
		
		.main{
			width: 540rpx;
			border-radius: 20rpx;
			box-sizing: border-box;
			display: flex;
			flex-direction: column;
			align-items: center;
			
			.title{
				padding: 40rpx 0;
				color: #fff;
				font-size: 32rpx;
				text-align: center;
				margin-top: 20rpx;
			}
			.desc{
				color: #fff;
				font-size: 28rpx;
				text-align: center;
			}
			.qrcode{
				width: 412rpx;
				height: 412rpx;
				border-radius: 20rpx;
				margin-top: 40rpx;
			}
			
			.button_box{
				padding: 36rpx 0;
				
				.button{
					width: 140rpx;
					height: 52rpx;
					font-size: 24rpx;
					background-color: #fff;
					border-radius: 26rpx;
					line-height: 52rpx;
					text-align: center;
				}
			}
			
		}
	}
</style>